﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace API.Models.Repository
{
    public class V_SEC_USER_COMPANIES_Repository : GenericRepository<PartnerDbContext, V_SEC_USER_COMPANIES>
    {
        public override IQueryable<V_SEC_USER_COMPANIES> Find(System.Linq.Expressions.Expression<Func<V_SEC_USER_COMPANIES, bool>> predicate)
        {
            IQueryable<V_SEC_USER_COMPANIES> query = _entities.V_SEC_USER_COMPANIES
                .Include("COMPANY");
            ///    .Include("USER")

            /// Фильтрация по заданному условию
            if (predicate != null)
                query = query.Where(predicate);

            return query;
        }
    }
}